package com.ieheima.demo;

import java.io.Serializable;

public class User implements Serializable {
    //序列化时生成一个序列号，当更改User内容时，序列号发生了改变，
    // 当反序列化时由于版本不一致报错，所以在这里固定一个序列号
    private static final long serialVersionUID = 5865719165579215945L;
    private String username;
    private transient String password;

    public User() {
    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
